package com.infosys.cabplanningdao.cab.dao.impl;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.dao.DataAccessException;
import org.springframework.jdbc.core.ResultSetExtractor;
import org.springframework.jdbc.core.RowMapper;

import com.infosys.cabplanning.common.domain.CabType;

public class CabTypeRowMapper implements RowMapper<CabType> {

	@Override
	public CabType mapRow(ResultSet rs, int rowNum) throws SQLException {
		CabType cabType = new CabType();
		cabType.setCabTypeID(rs.getInt("type_id"));
		cabType.setName(rs.getString("name"));
		return cabType;
	}

}
